package com.hk.core.authentication.api;

import lombok.Getter;

import java.time.Instant;

@Getter
public class TokenExpiredException extends AuthenticationException {

    private static final String MSG = "Token has expired";

    private final String token;

    private final Instant expiresAt;

    public TokenExpiredException(String token, Instant expiresAt) {
        super(MSG);
        this.token = token;
        this.expiresAt = expiresAt;
    }

    public TokenExpiredException(String token, Instant expiresAt, Throwable t) {
        super(MSG, t);
        this.token = token;
        this.expiresAt = expiresAt;
    }
}
